// 客户接口
export interface Customer {
  customerID?: number;
  username: string;
  passwordHash?: string;
  password?: string; // 仅用于前端表单
  name: string;
  idNumber: string;
  phone: string;
}

// 管理员接口
export interface Admin {
  adminID?: number;
  username: string;
  passwordHash?: string;
  password?: string; // 仅用于前端表单
}

// 房间接口
export interface Room {
  roomId?: number;
  roomNumber: string;
  roomType: string;
  status: '空闲' | '预订' | '占用' | '清洁中';
  price: number;
}

// 预订接口
export interface Booking {
  bookingId?: number;
  customerID: number;
  roomId: number;
  bookingTime?: Date;
  checkInTime: string | Date;
  checkOutTime: string | Date;
  totalAmount: number;
  status: '预订中' | '已入住' | '已退房' | '取消';
  // 可能需要的额外字段，用于前端展示
  roomNumber?: string;
  roomType?: string;
  customerName?: string;
  // 新增字段，用于在获取详细信息后存储房间和客户对象
  roomInfo?: Room;
  customerInfo?: Customer;
}

// 登录请求接口
export interface LoginRequest {
  username: string;
  password: string;
}

// 登录响应接口
export interface LoginResponse {
  token: string;
  user: Customer | Admin;
  userType: 'customer' | 'admin';
}

// API响应接口
export interface ApiResponse<T> {
  code: number;
  message: string;
  data: T;
}